From: Manuel Munz Date: Wed, 7 Aug 2013 21:39:18 +0000 (+0200) Subject: if we could not get the l3 device in olsrd_write_interface then try to get the X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=385bb5489dfc3b5b308f2db55e9cdbd94fee5a01;p=feed%2Frouting.git if we could not get the l3 device in olsrd_write_interface then try to get the physical device instead. But only if the protocoll is "static" or "none". This is useful to write Interfaces in the resulting olsrd.conf file which are not up at the time olsrd is starting (e.g. tunnel interfaces): --- diff --git a/olsrd/files/olsrd.init b/olsrd/files/olsrd.init index f4641aa..80f93ce 100644 --- a/olsrd/files/olsrd.init +++ b/olsrd/files/olsrd.init @@ -564,6 +564,12 @@ olsrd_write_interface() { if network_get_device IFNAME "$interface"; then ifnames="$ifnames \"$IFNAME\"" ifsglobal="$ifsglobal $IFNAME" + elif network_get_physdev IFNAME "$interface"; then + local proto="$(uci -q get network.${interface}.proto)" + if [ "$proto" = "static" -o "$proto" = "none" ]; then + ifnames="$ifnames \"$IFNAME\"" + ifsglobal="$ifsglobal $IFNAME" + fi else log "$funcname() Warning: Interface '$interface' not found, skipped" fi